<?php
	session_start();
	if ( isset( $_SESSION['auth'] ) )
	{
		$fp = @fsockopen( $_SESSION['ip'], $_SESSION['rport'], $errno, $errstr, 5);
		if ( !$fp ) exit( "OFF" );
		fwrite( $fp, $_SESSION['auth']." GETPLAYER ".$_GET['id'] );
		$len = fread( $fp, 1 );
		if ( $len != "0" )
		{
			$len = ord( $len );
			$data = fread( $fp, $len );
			$dat = explode( chr(3), $data );
			echo "<table width=\"500\">
			<tr><td>ID:</td><td>".$_GET['id']."</td></tr>
			<tr><td>Nickname:</td><td>".$dat[0]."</td></tr>
			<tr><td>IP:</td><td>".$dat[1]."</td></tr>
			<tr><td>HP:</td><td>".$dat[2]."%</td></tr>
			<tr><td>Armour:</td><td>".$dat[3]."%</td></tr>
			</table>";
		}
		else echo "No info received.";
		fclose( $fp );
	}
?>